<template>
  <body>
    <router-view></router-view>
    <div class="container">
      <div class="forms-container">
        <div class="signin-signup">
          <form action="" class="sign-in-form">
            <h2 class="title">注册</h2>
            <div class="input-field">
              <input
                type="text"
                placeholder="请输入账号(教工号)"
                v-model="username"
              />
            </div>
            <div class="input-field">
              <input
                type="password"
                placeholder="请输入密码"
                v-model="password"
              />
            </div>
            <div class="input-field">
              <input
                type="password"
                placeholder="请再次输入密码"
                v-model="confirmpassword"
              />
            </div>
            <!-- <input type="submit" value="Login" class="btn solid"> -->
            <button type="button" class="btn solid" @click="gomainframe">
              立即注册
            </button>
          </form>
        </div>
      </div>
    </div>
  </body>
</template>

<script>
export default {
  data() {
    return {
      username: "",
      password: "",
      confirmpassword: "",
    };
  },
  methods: {
    gomainframe() {
      this.$router.push({
        path: "/mainframe",
        query: { username: this.username },
        params: { password: this.password },
      });
    },
  },
};
</script>

<style>
form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 5rem;
  overflow: hidden;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

form.sign-in-form {
  z-index: 2;
}

.title {
  font-size: 2.2rem;
  color: #444;
  margin-bottom: 10px;
  line-height: 70px;
}

.input-field {
  max-width: 380px;
  width: 100%;
  height: 55px;
  background-color: #f0f0f0;
  margin: 10px 0;
  /* border-radius: 55px; */
  display: grid;
  /* grid-template-columns: 15% 85%; */
  padding: 0 0.4rem;
  font-size: 20px;
}

.input-field i {
  text-align: center;
  line-height: 55px;
  color: #000000;
  font-size: 1.1rem;
  font-style: normal;
}

.input-field input {
  background: none;
  outline: none;
  border: none;
  line-height: 1;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
}

.input-field input::placeholder {
  color: #aaa;
  font-weight: 500;
}

.btn {
  width: 100px;
  height: 49px;
  border: none;
  outline: none;
  border-radius: 49px;
  cursor: pointer;
  background-color: #5995fd;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  margin: 10px 0;
  transition: 0.5s;
  font-size: 18px;
}

.btn:hover {
  background-color: #4d84e2;
}

.social-text {
  padding: 0.7rem 0;
  font-size: 1rem;
}

.social-media {
  display: flex;
  justify-content: center;
}

.panels-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
</style>
